package com.kumi.controller;

import com.kumi.model.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import static java.lang.System.out;

/**
 * Created by Administrator on 2016/7/29 0029.
 */

@Controller
@RequestMapping(value="/user")
public class Usercheck {
           public ModelAndView save(ModelAndView modelAndView,String name,String nickname,String password)
            {
                User user=new User(name,nickname,password);
                modelAndView.addObject("user",user);
                if(name.equals("yyb")&&password.equals("123"))
                {
                   // out.print("出错了");
                modelAndView.setViewName("denglu");


                }
                else
                {
                    modelAndView.setViewName("index");
                }
                return modelAndView;
    }


}


